<template>
  <view class="template-course tn-safe-area-inset-bottom">
    <!-- 顶部自定义导航 -->
    <tn-nav-bar fixed alpha="false">广告详情</tn-nav-bar>

    <view class="tn-skeleton">
      <view class="tn-padding-top-xs" :style="{paddingTop: vuex_custom_bar_height + 'px'}">
        <view class="tn-margin-sm">
          <view class="tn-margin-sm tn-text-bold tn-text-xl">
            <text class="tn-skeleton-fillet">{{ data.title || '' }}</text>
            <text class=""></text>
          </view>
          <view class="tn-margin-sm tn-text-center crate_time tn-skeleton-fillet">
            <view class="tn-float-left tn-margin-right tn-text-sm">
              <text class="tn-color-gray--dark">{{ data.create_time || '' }}</text> 
            </view>
          </view>
        </view>
        
        <!-- 边距间隔 -->
        <view class="tn-strip-bottom"></view>
      
        <view class="tn-flex tn-flex-direction-column">
          <view class="justify-content-item tn-text-bold tn-text-xl tn-margin-top tn-margin-left-sm">
            <text class="tn-icon-title"></text>
            <text class="">广告内容</text>
          </view>
          <view class="tn-margin-top tn-margin-left tn-margin-right">
            <view class="tn-margin-bottom tn-skeleton-fillet content">
              <view class="cx-editor justify-content-item">
                <mp-html v-if="data.detail && data.detail.content" :content="data.detail.content" :preview-img="false" :show-img-menu="false" :lazy-load="true"/>
              </view>
            </view>
          </view>
        </view>
      </view>
    </view>
    
    <view class="tn-tabbar-height2"></view>
  </view>
</template>

<script>
  import base from '@/common/mixin/base.js';
	import request from '@/common/request.js';
  export default {
    name: 'advertisingView',
    mixins: [base],
    data(){
      return {
        model: 'advertising',
        data:
        {
          id: null,
          title: null,
          detail: null,
          create_time: null,
        }
      }
    },
    methods: {
			// 监听用户点击右上角菜单的「转发」按钮时触发的事件
			onShareAppMessage: function(options) {
			  return this.handleShareAppMessage(options);
			},
			// 监听用户点击右上角菜单的「分享到朋友圈」按钮时触发的事件
			onShareTimeline: function(options) {
			  return this.handleShareTimeline(options);
			},
    },
    onLoad(option) {
      this.getViewData(option.id);
    },
  }
</script>

<style lang="scss" scoped>
  @import '@/static/scss/common.scss';

  .crate_time {
    height: 30rpx;
  }
  ::v-deep img {
    width: 100%;
  }
</style>
